/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package yudisium;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;

/**
 *
 * @author Antonius
 */
public class FrameUtamaMahasiswa extends JFrame{
    private JButton daftar;
    private JLabel background;
    private JButton tombol;

    public FrameUtamaMahasiswa() {
        this.setTitle("PENDAFTARAN YUDISIUM");
        setLocation(0, 0);
        setSize(600,500);
        this.setResizable(false);
        this.getContentPane().setLayout(null);
        
        tombol = new JButton();
        tombol.setBounds(400, 350, 150, 30);
        tombol.setText("DAFTAR YUDISIUM");
        tombol.addActionListener(new ActionListener() {

            @Override
            public void actionPerformed(ActionEvent ae) {
                tombol.setSize(600,500);
                tombol.setLocation(0,0);
                PanelDaftarYudisium daftaryudisium = new PanelDaftarYudisium();
                tombol.add(daftaryudisium);
            }
        });
        this.getContentPane().add(tombol);
        
        background = new JLabel(new ImageIcon("usd.gif"));
        this.add(background);
        background.setBounds(398, 180, 150, 150);
        
        background = new JLabel(new ImageIcon("frame.jpg"));
        this.add(background); 
        background.setBounds(0, 0, 600,500);
    }
    
    public static void main(String[] args) {
        FrameUtamaMahasiswa Main = new FrameUtamaMahasiswa();
        Main.setVisible(true);
    }
}